package com.xiaoshuidi.cloud.module.finance.enums.voucher;

import io.swagger.v3.oas.models.security.SecurityScheme;
import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
public enum FinanceVoucherTypeEnum {
		VOUCHER_TYPE_SK(1, "收款凭证"),
		VOUCHER_TYPE_ZZ(2, "转账凭证");

		private final Integer code;
		private final String name;

		FinanceVoucherTypeEnum(Integer code, String name) {
				this.code = code;
				this.name = name;
		}

		public static FinanceVoucherTypeEnum find(Integer code) {
				for (FinanceVoucherTypeEnum value : values()) {
						if (value.getCode().equals(code)) {
								return value;
						}
				}
				return null;
		}
}
